<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Схема разработана Управлением актуализации и модернизации руководств по структурированным электронным медицинским документам (СЭМД) 2023 -->
<!-- Включены элементы разработанные Health Level Seven -->

<xs:schema xmlns="urn:hl7-org:v3" xmlns:address="urn:hl7-ru:address" xmlns:fias="urn:hl7-ru:fias" xmlns:identity="urn:hl7-ru:identity" elementFormDefault="qualified" targetNamespace="urn:hl7-org:v3" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:import schemaLocation="fias.xsd" namespace="urn:hl7-ru:fias" />
  <xs:import schemaLocation="address.xsd" namespace="urn:hl7-ru:address" />
  <xs:import schemaLocation="identity.xsd" namespace="urn:hl7-ru:identity" />
  <xs:include schemaLocation="coreschemas/datatypes.xsd" />
  <xs:include schemaLocation="coreschemas/voc.xsd" />
  <xs:include schemaLocation="coreschemas/NarrativeBlock.xsd" />
  <xs:complexType name="POCD_MT000040.Component2">
    <xs:sequence>
      <xs:element minOccurs="1" maxOccurs="1" name="structuredBody" type="structuredBody_178" />
    </xs:sequence>
    <xs:attribute name="nullFlavor" type="NullFlavor" use="prohibited" />
  </xs:complexType>
  <xs:complexType name="structuredBody_178">
    <xs:sequence>
      <xs:element minOccurs="5" maxOccurs="9" name="component" type="component_179" />
    </xs:sequence>
    <xs:attribute name="nullFlavor" type="NullFlavor" use="prohibited" />
  </xs:complexType>
  <xs:complexType name="component_179">
    <xs:sequence>
      <xs:element minOccurs="1" maxOccurs="1" name="section" type="section_180" />
    </xs:sequence>
    <xs:attribute name="nullFlavor" type="NullFlavor" use="prohibited" />
  </xs:complexType>
  <xs:complexType name="section_180">
    <xs:sequence>
      <xs:element minOccurs="1" maxOccurs="1" name="code" type="code_181" />
      <xs:element minOccurs="1" maxOccurs="1" name="title" type="ST" />
      <xs:element minOccurs="1" maxOccurs="unbounded" name="entry" type="entry_183" />
    </xs:sequence>
    <xs:attribute name="nullFlavor" type="NullFlavor" use="prohibited" />
  </xs:complexType>
  <xs:complexType name="code_181">
    <xs:attribute name="code" use="required">
      <xs:simpleType>
        <xs:restriction base="cs">
          <xs:enumeration value="DOCINFO" />
          <xs:enumeration value="WORK" />
          <xs:enumeration value="PRVDS" />
          <xs:enumeration value="IMM" />
          <xs:enumeration value="RESCONS" />
          <xs:enumeration value="RESINSTR" />
          <xs:enumeration value="RESLAB" />
          <xs:enumeration value="RESINFO" />
          <xs:enumeration value="LINKDOCS" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="codeSystem" use="required">
      <xs:simpleType>
        <xs:restriction base="uid">
          <xs:enumeration value="1.2.643.5.1.13.13.99.2.197" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="codeSystemName" type="st" use="required" />
    <xs:attribute name="codeSystemVersion" type="st" use="required" />
    <xs:attribute name="displayName" type="st" use="required" />
    <xs:attribute name="nullFlavor" type="NullFlavor" use="prohibited" />
  </xs:complexType>
  <xs:complexType name="entry_183">
    <xs:sequence>
      <xs:choice minOccurs="1">
        <xs:element minOccurs="1" maxOccurs="1" name="act" type="act_299" />
        <xs:element minOccurs="1" maxOccurs="1" name="observation" type="observation_184" />
        <xs:element minOccurs="1" maxOccurs="1" name="organizer" type="organizer_192" />
        <xs:element minOccurs="1" maxOccurs="1" name="substanceAdministration" type="substanceAdministration_224" />
      </xs:choice>
    </xs:sequence>
    <xs:attribute name="nullFlavor" type="NullFlavor" use="prohibited" />
  </xs:complexType>
  <xs:complexType name="observation_184">
    <xs:sequence>
      <xs:element minOccurs="1" maxOccurs="1" name="code" type="code_185" />
      <xs:choice minOccurs="0">
        <xs:element minOccurs="0" maxOccurs="1" name="text" type="ED" />
        <xs:element minOccurs="1" maxOccurs="1" name="statusCode" type="statusCode_237" />
      </xs:choice>
      <xs:element minOccurs="0" maxOccurs="1" name="effectiveTime" type="effectiveTime_238" />
      <xs:element minOccurs="0" maxOccurs="1" name="value" type="ANY" />
      <xs:element minOccurs="0" maxOccurs="1" name="performer" type="performer_240" />
      <xs:element minOccurs="0" maxOccurs="1" name="entryRelationship" type="entryRelationship_250" />
      <xs:element minOccurs="0" maxOccurs="1" name="reference" type="reference_254" />
    </xs:sequence>
    <xs:attribute name="nullFlavor" type="NullFlavor" use="prohibited" />
    <xs:attribute name="classCode" use="required">
      <xs:simpleType>
        <xs:restriction base="ActClassObservation">
          <xs:enumeration value="OBS" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="moodCode" use="required">
      <xs:simpleType>
        <xs:restriction base="x_ActMoodDocumentObservation">
          <xs:enumeration value="EVN" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
  </xs:complexType>
  <xs:complexType name="code_185">
    <xs:sequence minOccurs="0">
      <xs:element minOccurs="0" maxOccurs="1" name="originalText" type="ED" />
    </xs:sequence>
    <xs:attribute name="code" type="cs" use="optional" />
    <xs:attribute name="codeSystem" use="optional">
      <xs:simpleType>
        <xs:restriction base="uid">
          <xs:enumeration value="1.2.643.5.1.13.13.99.2.166" />
          <xs:enumeration value="1.2.643.5.1.13.13.11.1077" />
          <xs:enumeration value="1.2.643.5.1.13.13.11.1471" />
          <xs:enumeration value="1.2.643.5.1.13.13.11.1437" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="codeSystemName" type="st" use="optional" />
    <xs:attribute name="codeSystemVersion" type="st" use="optional" />
    <xs:attribute name="displayName" type="st" use="optional" />
    <xs:attribute name="nullFlavor" use="optional" type="NullFlavor" />
  </xs:complexType>
  <xs:complexType name="organizer_192">
    <xs:sequence>
      <xs:element minOccurs="1" maxOccurs="1" name="code" type="code_193" />
      <xs:element minOccurs="1" maxOccurs="1" name="statusCode" type="statusCode_194" />
      <xs:element minOccurs="1" maxOccurs="1" name="participant" type="participant_195" />
    </xs:sequence>
    <xs:attribute name="nullFlavor" type="NullFlavor" use="prohibited" />
    <xs:attribute name="classCode" use="required">
      <xs:simpleType>
        <xs:restriction base="x_ActClassDocumentEntryOrganizer">
          <xs:enumeration value="CLUSTER" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="moodCode" use="required">
      <xs:simpleType>
        <xs:restriction base="ActMood">
          <xs:enumeration value="EVN" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
  </xs:complexType>
  <xs:complexType name="code_193">
    <xs:attribute name="code" use="required">
      <xs:simpleType>
        <xs:restriction base="cs">
          <xs:enumeration value="4073" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="codeSystem" use="required">
      <xs:simpleType>
        <xs:restriction base="uid">
          <xs:enumeration value="1.2.643.5.1.13.13.99.2.166" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="codeSystemName" type="st" use="required" />
    <xs:attribute name="codeSystemVersion" type="st" use="required" />
    <xs:attribute name="displayName" type="st" use="required" />
    <xs:attribute name="nullFlavor" type="NullFlavor" use="prohibited" />
  </xs:complexType>
  <xs:complexType name="statusCode_194">
    <xs:attribute name="code" use="required">
      <xs:simpleType>
        <xs:restriction base="cs">
          <xs:enumeration value="completed" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="nullFlavor" type="NullFlavor" use="prohibited" />
  </xs:complexType>
  <xs:complexType name="participant_195">
    <xs:sequence>
      <xs:element minOccurs="1" maxOccurs="1" name="participantRole" type="participantRole_196" />
    </xs:sequence>
    <xs:attribute name="nullFlavor" type="NullFlavor" use="prohibited" />
    <xs:attribute name="typeCode" use="required">
      <xs:simpleType>
        <xs:restriction base="ParticipationType">
          <xs:enumeration value="LOC" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
  </xs:complexType>
  <xs:complexType name="participantRole_196">
    <xs:sequence minOccurs="0">
      <xs:element minOccurs="0" maxOccurs="1" name="addr" type="AD" />
      <xs:element minOccurs="0" maxOccurs="1" name="telecom" type="telecom_204" />
      <xs:element minOccurs="1" maxOccurs="1" name="playingEntity" type="playingEntity_205" />
    </xs:sequence>
    <xs:attribute name="nullFlavor" type="NullFlavor" use="optional" />
    <xs:attribute name="classCode" use="optional">
      <xs:simpleType>
        <xs:restriction base="RoleClassRoot">
          <xs:enumeration value="SDLOC" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
  </xs:complexType>
  <xs:complexType name="telecom_204">
    <xs:attribute name="nullFlavor" type="NullFlavor" use="prohibited" />
    <xs:attribute name="value" type="url" use="required" />
    <xs:attribute name="use" type="set_TelecommunicationAddressUse" use="optional" />
  </xs:complexType>
  <xs:complexType name="playingEntity_205">
    <xs:sequence>
      <xs:element minOccurs="1" maxOccurs="1" name="name" type="st" />
      <xs:group ref="identity:Props_body"/>
    </xs:sequence>
    <xs:attribute name="nullFlavor" type="NullFlavor" use="prohibited" />
    <xs:attribute name="classCode" type="EntityClassRoot" use="optional" />
    <xs:attribute name="determinerCode" use="optional">
      <xs:simpleType>
        <xs:restriction base="EntityDeterminer">
          <xs:enumeration value="INSTANCE" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
  </xs:complexType>
  <xs:complexType name="substanceAdministration_224">
    <xs:sequence>
      <xs:element minOccurs="1" maxOccurs="1" name="effectiveTime" type="SXCM_TS" />
      <xs:element minOccurs="1" maxOccurs="1" name="consumable" type="consumable_226" />
    </xs:sequence>
    <xs:attribute name="nullFlavor" type="NullFlavor" use="prohibited" />
    <xs:attribute name="classCode" use="required">
      <xs:simpleType>
        <xs:restriction base="ActClass">
          <xs:enumeration value="SBADM" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="moodCode" use="required">
      <xs:simpleType>
        <xs:restriction base="x_DocumentSubstanceMood">
          <xs:enumeration value="RQO" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
  </xs:complexType>
  <xs:complexType name="effectiveTime_225">
    <xs:attribute name="value" type="ts" use="optional" />
    <xs:attribute name="nullFlavor" type="NullFlavor" use="optional" />
  </xs:complexType>
  <xs:complexType name="consumable_226">
    <xs:sequence>
      <xs:element minOccurs="1" maxOccurs="1" name="manufacturedProduct" type="manufacturedProduct_227" />
    </xs:sequence>
    <xs:attribute name="nullFlavor" type="NullFlavor" use="prohibited" />
    <xs:attribute name="typeCode" use="required">
      <xs:simpleType>
        <xs:restriction base="ParticipationType">
          <xs:enumeration value="CSM" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
  </xs:complexType>
  <xs:complexType name="manufacturedProduct_227">
    <xs:sequence>
      <xs:element minOccurs="1" maxOccurs="1" name="manufacturedMaterial" type="manufacturedMaterial_228" />
    </xs:sequence>
    <xs:attribute name="nullFlavor" type="NullFlavor" use="prohibited" />
    <xs:attribute name="classCode" use="required">
      <xs:simpleType>
        <xs:restriction base="RoleClassManufacturedProduct">
          <xs:enumeration value="MANU" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
  </xs:complexType>
  <xs:complexType name="manufacturedMaterial_228">
    <xs:sequence>
      <xs:element minOccurs="1" maxOccurs="1" name="code" type="code_229" />
    </xs:sequence>
    <xs:attribute name="nullFlavor" type="NullFlavor" use="prohibited" />
    <xs:attribute name="classCode" use="required">
      <xs:simpleType>
        <xs:restriction base="EntityClassManufacturedMaterial">
          <xs:enumeration value="MMAT" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="determinerCode" use="required">
      <xs:simpleType>
        <xs:restriction base="EntityDeterminerDetermined">
          <xs:enumeration value="KIND" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
  </xs:complexType>
  <xs:complexType name="code_229">
    <xs:attribute name="code" type="cs" use="required" />
    <xs:attribute name="codeSystem" use="required">
      <xs:simpleType>
        <xs:restriction base="uid">
          <xs:enumeration value="1.2.643.5.1.13.13.11.1078" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="codeSystemName" type="st" use="required" />
    <xs:attribute name="codeSystemVersion" type="st" use="required" />
    <xs:attribute name="displayName" type="st" use="required" />
    <xs:attribute name="nullFlavor" type="NullFlavor" use="prohibited" />
  </xs:complexType>
  <xs:complexType name="statusCode_237">
    <xs:attribute name="code" use="required">
      <xs:simpleType>
        <xs:restriction base="cs">
          <xs:enumeration value="completed" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="nullFlavor" type="NullFlavor" use="prohibited" />
  </xs:complexType>
  <xs:complexType name="effectiveTime_238">
    <xs:attribute name="value" type="ts" use="optional" />
    <xs:attribute name="nullFlavor" type="NullFlavor" use="optional" />
  </xs:complexType>
  <xs:complexType name="performer_240">
    <xs:sequence>
      <xs:element minOccurs="1" maxOccurs="1" name="assignedEntity" type="assignedEntity_241" />
    </xs:sequence>
    <xs:attribute name="nullFlavor" type="NullFlavor" use="prohibited" />
  </xs:complexType>
  <xs:complexType name="assignedEntity_241">
    <xs:sequence>
      <xs:element minOccurs="1" maxOccurs="1" name="id" type="id_242" />
      <xs:element minOccurs="1" maxOccurs="1" name="code" type="code_243" />
      <xs:element minOccurs="0" maxOccurs="1" name="telecom" type="telecom_244" />
      <xs:element minOccurs="0" maxOccurs="1" name="assignedPerson" type="assignedPerson_245" />
    </xs:sequence>
    <xs:attribute name="nullFlavor" type="NullFlavor" use="prohibited" />
  </xs:complexType>
  <xs:complexType name="id_242">
    <xs:attribute name="root" type="uid" use="required" />
    <xs:attribute name="extension" type="st" use="required" />
    <xs:attribute name="nullFlavor" type="NullFlavor" use="prohibited" />
  </xs:complexType>
  <xs:complexType name="code_243">
    <xs:attribute name="code" type="cs" use="required" />
    <xs:attribute name="codeSystem" use="required">
      <xs:simpleType>
        <xs:restriction base="uid">
          <xs:enumeration value="1.2.643.5.1.13.13.11.1002" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="codeSystemName" type="st" use="required" />
    <xs:attribute name="codeSystemVersion" type="st" use="required" />
    <xs:attribute name="displayName" type="st" use="required" />
    <xs:attribute name="nullFlavor" type="NullFlavor" use="prohibited" />
  </xs:complexType>
  <xs:complexType name="telecom_244">
    <xs:attribute name="nullFlavor" type="NullFlavor" use="prohibited" />
    <xs:attribute name="value" type="url" use="required" />
    <xs:attribute name="use" type="set_TelecommunicationAddressUse" use="optional" />
  </xs:complexType>
  <xs:complexType name="assignedPerson_245">
    <xs:sequence>
      <xs:element minOccurs="1" maxOccurs="1" name="name" type="name_246" />
    </xs:sequence>
    <xs:attribute name="nullFlavor" type="NullFlavor" use="prohibited" />
  </xs:complexType>
  <xs:complexType name="name_246">
    <xs:sequence>
      <xs:element minOccurs="1" maxOccurs="1" name="family" type="st" />
      <xs:element minOccurs="1" maxOccurs="1" name="given" type="st" />
      <xs:element minOccurs="0" maxOccurs="1" ref="identity:Patronymic" />
    </xs:sequence>
    <xs:attribute name="nullFlavor" type="NullFlavor" use="prohibited" />
  </xs:complexType>
  <xs:complexType name="entryRelationship_250">
    <xs:sequence>
      <xs:element minOccurs="1" maxOccurs="1" name="observation" type="observation_251" />
    </xs:sequence>
    <xs:attribute name="nullFlavor" type="NullFlavor" use="prohibited" />
    <xs:attribute name="typeCode" use="required">
      <xs:simpleType>
        <xs:restriction base="x_ActRelationshipEntryRelationship">
          <xs:enumeration value="COMP" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
  </xs:complexType>
  <xs:complexType name="observation_251">
    <xs:sequence>
      <xs:element minOccurs="1" maxOccurs="1" name="code" type="code_252" />
      <xs:element minOccurs="1" maxOccurs="1" name="value" type="ANY" />
    </xs:sequence>
    <xs:attribute name="nullFlavor" type="NullFlavor" use="prohibited" />
    <xs:attribute name="classCode" use="required">
      <xs:simpleType>
        <xs:restriction base="ActClassObservation">
          <xs:enumeration value="OBS" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="moodCode" use="required">
      <xs:simpleType>
        <xs:restriction base="x_ActMoodDocumentObservation">
          <xs:enumeration value="EVN" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
  </xs:complexType>
  <xs:complexType name="code_252">
    <xs:attribute name="code" use="required">
      <xs:simpleType>
        <xs:restriction base="cs">
          <xs:enumeration value="809" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="codeSystem" use="required">
      <xs:simpleType>
        <xs:restriction base="uid">
          <xs:enumeration value="1.2.643.5.1.13.13.99.2.166" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="codeSystemName" type="st" use="required" />
    <xs:attribute name="codeSystemVersion" type="st" use="required" />
    <xs:attribute name="displayName" type="st" use="required" />
    <xs:attribute name="nullFlavor" type="NullFlavor" use="prohibited" />
  </xs:complexType>
  <xs:complexType name="reference_254">
    <xs:sequence>
      <xs:element minOccurs="1" maxOccurs="1" name="externalDocument" type="externalDocument_255" />
    </xs:sequence>
    <xs:attribute name="nullFlavor" type="NullFlavor" use="prohibited" />
    <xs:attribute name="typeCode" use="required">
      <xs:simpleType>
        <xs:restriction base="x_ActRelationshipExternalReference">
          <xs:enumeration value="REFR" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
  </xs:complexType>
  <xs:complexType name="externalDocument_255">
    <xs:sequence>
      <xs:element minOccurs="2" maxOccurs="2" name="id" type="id_256" />
    </xs:sequence>
    <xs:attribute name="nullFlavor" type="NullFlavor" use="prohibited" />
    <xs:attribute name="classCode" use="required">
      <xs:simpleType>
        <xs:restriction base="ActClassDocument">
          <xs:enumeration value="DOCCLIN" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="moodCode" use="required">
      <xs:simpleType>
        <xs:restriction base="ActMood">
          <xs:enumeration value="EVN" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
  </xs:complexType>
  <xs:complexType name="id_256">
    <xs:attribute name="root" use="optional" >
      <xs:simpleType>
        <xs:restriction base="uid">
          <xs:pattern value="[0-2](\.(0|[1-9][0-9]*))*.51|1.2.643.5.1.13.13.17.1.1"/>
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="extension" type="st" use="optional" />
    <xs:attribute name="nullFlavor" type="NullFlavor" use="optional" />
  </xs:complexType>
  <xs:complexType name="act_299">
    <xs:sequence>
      <xs:element minOccurs="1" maxOccurs="1" name="code" type="code_300" />
      <xs:element minOccurs="0" maxOccurs="1" name="text" type="ED" />
      <xs:element minOccurs="1" maxOccurs="1" name="effectiveTime" type="effectiveTime_302" />
      <xs:element minOccurs="0" maxOccurs="3" name="entryRelationship" type="entryRelationship_303" />
      <xs:element minOccurs="1" maxOccurs="1" name="reference" type="reference_315" />
    </xs:sequence>
    <xs:attribute name="nullFlavor" type="NullFlavor" use="prohibited" />
    <xs:attribute name="classCode" use="required">
      <xs:simpleType>
        <xs:restriction base="x_ActClassDocumentEntryAct">
          <xs:enumeration value="ACT" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="moodCode" use="required">
      <xs:simpleType>
        <xs:restriction base="x_DocumentActMood">
          <xs:enumeration value="EVN" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
  </xs:complexType>
  <xs:complexType name="code_300">
    <xs:attribute name="code" type="cs" use="required" />
    <xs:attribute name="codeSystem" type="uid" use="required" />
    <xs:attribute name="codeSystemName" type="st" use="required" />
    <xs:attribute name="codeSystemVersion" type="st" use="required" />
    <xs:attribute name="displayName" type="st" use="required" />
    <xs:attribute name="nullFlavor" type="NullFlavor" use="prohibited" />
  </xs:complexType>
  <xs:complexType name="effectiveTime_302">
    <xs:attribute name="value" type="ts" use="required" />
    <xs:attribute name="nullFlavor" type="NullFlavor" use="prohibited" />
  </xs:complexType>
  <xs:complexType name="entryRelationship_303">
    <xs:sequence>
      <xs:element minOccurs="1" maxOccurs="1" name="observation" type="observation_304" />
    </xs:sequence>
    <xs:attribute name="nullFlavor" type="NullFlavor" use="prohibited" />
    <xs:attribute name="typeCode" use="required">
      <xs:simpleType>
        <xs:restriction base="x_ActRelationshipEntryRelationship">
          <xs:enumeration value="COMP" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
  </xs:complexType>
  <xs:complexType name="observation_304">
    <xs:sequence>
      <xs:element minOccurs="1" maxOccurs="1" name="code" type="code_305" />
      <xs:element minOccurs="1" maxOccurs="1" name="value" type="ANY" />
    </xs:sequence>
    <xs:attribute name="nullFlavor" type="NullFlavor" use="prohibited" />
    <xs:attribute name="classCode" use="required">
      <xs:simpleType>
        <xs:restriction base="ActClassObservation">
          <xs:enumeration value="OBS" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="moodCode" use="required">
      <xs:simpleType>
        <xs:restriction base="x_ActMoodDocumentObservation">
          <xs:enumeration value="EVN" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
  </xs:complexType>
  <xs:complexType name="code_305">
    <xs:attribute name="code" use="required">
      <xs:simpleType>
        <xs:restriction base="cs">
          <xs:enumeration value="11002" />
          <xs:enumeration value="11003" />
          <xs:enumeration value="6058" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="codeSystem" use="required">
      <xs:simpleType>
        <xs:restriction base="uid">
          <xs:enumeration value="1.2.643.5.1.13.13.99.2.166" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="codeSystemName" type="st" use="required" />
    <xs:attribute name="codeSystemVersion" type="st" use="required" />
    <xs:attribute name="displayName" type="st" use="required" />
    <xs:attribute name="nullFlavor" type="NullFlavor" use="prohibited" />
  </xs:complexType>
  <xs:complexType name="reference_315">
    <xs:sequence>
      <xs:element minOccurs="1" maxOccurs="1" name="externalDocument" type="externalDocument_316" />
    </xs:sequence>
    <xs:attribute name="nullFlavor" type="NullFlavor" use="prohibited" />
    <xs:attribute name="typeCode" use="required">
      <xs:simpleType>
        <xs:restriction base="x_ActRelationshipExternalReference">
          <xs:enumeration value="REFR" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
  </xs:complexType>
  <xs:complexType name="externalDocument_316">
    <xs:sequence>
      <xs:element minOccurs="2" maxOccurs="2" name="id" type="id_317" />
    </xs:sequence>
    <xs:attribute name="nullFlavor" type="NullFlavor" use="prohibited" />
    <xs:attribute name="classCode" use="required">
      <xs:simpleType>
        <xs:restriction base="ActClassDocument">
          <xs:enumeration value="DOCCLIN" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="moodCode" use="required">
      <xs:simpleType>
        <xs:restriction base="ActMood">
          <xs:enumeration value="EVN" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
  </xs:complexType>
  <xs:complexType name="id_317">
    <xs:attribute name="root" use="optional" >
      <xs:simpleType>
        <xs:restriction base="uid">
          <xs:pattern value="[0-2](\.(0|[1-9][0-9]*))*.51|1.2.643.5.1.13.13.17.1.1"/>
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="extension" type="st" use="optional" />
    <xs:attribute name="nullFlavor" type="NullFlavor" use="optional" />
  </xs:complexType>
</xs:schema>